import { VxeUI } from 'vxe-pc-ui'

import 'vxe-table/styles/cssvar.scss'
import 'vxe-pc-ui/lib/style.css'

import { initCell } from './initCell'
import { initLang } from './lang'
import { initVxe } from './initVxe'

initCell(VxeUI)
initLang(VxeUI)
initVxe(VxeUI)

VxeUI.setConfig({
  table: {
    align: 'center',
    columnConfig: {
      resizable: true,
    },
  },
  grid: {
    toolbarConfig: {
      custom: true,
      refresh: true,
      resizable: true,
      // search: true,
      zoom: true,
    },
    border: true,
    minHeight: 180,
    formConfig: {
      // 全局禁用vxe-table的表单配置，使用formOptions
      enabled: false,
    },
    proxyConfig: {
      autoLoad: true,
      response: {
        result: 'items',
        total: 'total',
        list: 'items',
      },
      showActiveMsg: true,
      showResponseMsg: false,
    },
    round: true,
    showOverflow: true,
    // size: 'small',
  },
})
